<?php
header("Content-type: text/html; charset=utf-8");
include_once('../fm/comm.php');
include_once('../comm.php');
$myt = new thunder();

if(isset($_REQUEST)){
	extract($_REQUEST);
}

$sql = "SELECT * FROM ".$_table_goods_source." where goods_id=".$gid;
$data = $myt->getAll($sql);
//var_dump($data);
$str = '';
foreach($data as $d){
	$str .= "<photo>
        <thumb>../".$d['thumb_url']."</thumb>
        <img_id>".$d['img_id']."</img_id>
        </photo>";
}
//$str = rtrim($str, ',');
//$str = "[".$str."]";
$xml = '<root>'.$str.'</root>';


echo $xml;

?>